﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace MINERP.ProductBigPic
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool isAppRunning = false;
            System.Threading.Mutex mutex = new System.Threading.Mutex(
                true,
                System.Diagnostics.Process.GetCurrentProcess().ProcessName,
                out isAppRunning);

            if (!isAppRunning)
            {
                MessageBox.Show("本程序已运行，请不要重复运行！");
                Environment.Exit(1);
            }
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                FrmLogin frmLogin = new FrmLogin();
                //Application.ApplicationExit += new EventHandler(frmLogin.Application_ApplicationExit);
                //if (DialogResult.OK==frmLogin.ShowDialog())
                //{
                //    FrmMain frmm = new FrmMain();
                //    frmm.PrinterID=frmLogin.PrinterId;
                //    frmm.strICCPATH = frmLogin.IccPath;
                //    frmm._printName = frmLogin._printName;
                //    frmm.IsReboot = frmLogin.isReboot;
                //    frmm.IsTransverse = frmLogin._isTransverse;
                //    Application.Run(frmm);
                //}
                //else
                //{
                //    Application.Exit();
                //}
                Application.Run(new FrmMain());
            }
        }


    }
}